/*
 * @Description: 
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2021-08-17 18:58:49
 * @LastEditTime: 2021-08-17 20:35:10
 * @FilePath: \cscec-pms-admin\src\api\project\optimization.js
 */
import request from '@/utils/request'
import { projectApisUrl,technicalApiUrl} from '../config'
/**
 * 双优化立项列表
 * @param parameter
 */
export function getOptimizationList(data) {
  return request({
    url: projectApisUrl + '/project/optimization/list',
    method: 'post',
    data
  })
}

/**
 * 双优化立项统计
 * @param
 */
export function getOptimizationTotal(data) {
  return request({
    url: projectApisUrl + '/project/optimization/total/list',
    method: 'post',
    data
  })
}

/**
 * 双优化立项新增
 * @param
 */
export function addOptimization(data) {
  return request({
    url: projectApisUrl + '/project/optimization',
    method: 'post',
    data: data
  })
}

/**
 * 双优化立项修改
 * @param
 */
export function editOptimization(data) {
  return request({
    url: projectApisUrl + '/project/optimization/update',
    method: 'post',
    data: data
  })
}

/**
 * 双优化立项登记修改状态
 * @param { data }
 */
export function updateBasicStatusOptimization(data) {
  return request({
    url: projectApisUrl + '/project/optimization/updateBasicStatus',
    method: 'post',
    data: data
  })
}

/**
 * 双优化立项详情
 * @param
 */
export function getOptimizationDetails(id) {
  return request({
    url: projectApisUrl + '/project/optimization/detail',
    method: 'get',
    params: id
  })
}

/**
 * 双优化附件删除
 * @param
 */
export function deleteOptimizationFile(data) {
  return request({
    url: projectApisUrl + '/project/implementation/fileDelete',
    method: 'post',
    data: data
  })
}
/**
 * @description: 打印
 * @param {object} data 接口参数
 * @return {promise}
 */
export function optimization(data) {
  return request({
    url: projectApisUrl + '/project/optimization/doc',
    method: 'get',
    params: data
  })
}
/**
 * @description: 选中推优
 * @param {object} data 接口参数
 * @return {promise}
 */
export function recommend(data) {
  return request({
    url: projectApisUrl + '/project/optimization/recommend',
    method: 'post',
    data
  })
}

/**
 * @description: 获取双优化效益统计数据分页
 * @param {object} data 接口参数
 * @return {promise}
 */
export function benefitPage(data) {
  return request({
    url: technicalApiUrl + '/technical/benefit/page',
    method: 'post',
    data
  })
}